package com.gosophia.conference.action.scheme;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseAjaxAction;
import com.gosophia.conferenceManagement.scheme.dto.SchemeTransientStoreDTO;
import com.gosophia.conferenceManagement.scheme.ws.ConferenceSchemeWebService;

/**
 * 
 * @author ych
 * 
 */
@Scope("prototype")
@Controller("DeleteSchemeTransientStoreAction")
public class DeleteSchemeTransientStoreAction extends BaseAjaxAction<SchemeTransientStoreDTO> {
	
	private static final long serialVersionUID = 1L;
	@Autowired
	private ConferenceSchemeWebService conferenceSchemeWebService;
    private SchemeTransientStoreDTO schemeTransientStoreDTO;
    private Long schemeTransientStoreId;
	public Long getSchemeTransientStoreId() {
		return schemeTransientStoreId;
	}
	public void setSchemeTransientStoreId(Long schemeTransientStoreId) {
		this.schemeTransientStoreId = schemeTransientStoreId;
	}
	@Override
	public String _execute() throws Exception {
		if(schemeTransientStoreId!=null){
			conferenceSchemeWebService.deleteSchemeTransientStore(schemeTransientStoreId);
		}
		return SUCCESS;
	}
	public SchemeTransientStoreDTO getSchemeTransientStoreDTO() {
		return schemeTransientStoreDTO;
	}
	public void setSchemeTransientStoreDTO(
			SchemeTransientStoreDTO schemeTransientStoreDTO) {
		this.schemeTransientStoreDTO = schemeTransientStoreDTO;
	}
	@Override
	public SchemeTransientStoreDTO getDetailData() {
		return null;
	}

}
